

Given ster are A(1, 2, 3, 4, 5) and B(a, b, c)
For a function from A to B, for each element in A, we have to choose an element in B.
There are 3 ways of choosing each of the 5 elemets = 35
For only surjective functions, we have to get rid of the functions that don not map to all the elements in B.
Now total number of functions where 1 elemenet from B is ignored = 3*(25 - 2 )
= 3*(32 - 2)
= 3*30
= 90
Again total number of functions where 2 elements from B are ignored = 3*1 = 3 (3 choices for which 2 elements to ignore and 1 function with the remaining 1 element)
Ss total number of surjective functions = 243 - 90 - 3 = 243 - 93 = 150
